package com.itheima.a05oopextensdemo5;

public class Test {
    public static void main(String[] args) {
        Zi z = new Zi();
        // 子类中有show方法，只执行重写后的show方法
        z.show();  // Zi show
    }
}

class Fu {
    public void show() {
        System.out.println("Fu show");
    }
}

class Zi extends Fu {
    //子类重写了父类的show方法
    public void show() {
        System.out.println("Zi show");
    }
}
